<template>
  <h1>El-布局组件</h1>
  <!-- gutter设置间距 row表示行,一行有24列 :span表示当前占几列 -->
  <el-row :gutter="10">
   <el-col :span="6">哈哈哈</el-col>
   <el-col :span="6" style="background-color:#0aa1ed;">哈哈哈</el-col>
   <el-col :span="6">哈哈哈</el-col>
   <el-col :span="6" style="background-color:#0aa1ed;">哈哈哈</el-col>
  </el-row>

  <h3>两张图</h3>
  <el-row :gutter="10">
   <el-col :span="12"><img src="rich.jpg" style="width:100%;"></el-col>
   <el-col :span="12"><img src="rich.jpg" style="width:100%;"></el-col>
  </el-row>
  <h3>六张图</h3>
  <el-row :gutter="10">
    <el-col :span="4"><img src="2024.png" style="width:100%;"></el-col>
    <el-col :span="4"><img src="2024.png" style="width:100%;"></el-col>
    <el-col :span="4"><img src="2024.png" style="width:100%;"></el-col>
    <el-col :span="4"><img src="2024.png" style="width:100%;"></el-col>
    <el-col :span="4"><img src="2024.png" style="width:100%;"></el-col>
    <el-col :span="4"><img src="2024.png" style="width:100%;"></el-col>
  </el-row>
  <h3>列偏移</h3>
  <!-- :offset="0" 0表示不偏移,默认靠左 --> 17:20继续 完成上面的练习1 2 3
  <el-row :gutter="10">
   <el-col :offset="0" :span="20"><img src="2024.png" style="width:100%;"></el-col>
  </el-row>
  <el-row :gutter="10">
    <!-- :offset="4"表示偏移4列,剩下的都偏移了,所以靠右 -->
    <el-col :offset="4" :span="20"><img src="2024.png" style="width:100%;"></el-col>
  </el-row>
  <el-row :gutter="10">
    <!-- :offset="2"表示偏移2列,剩下4列,偏移了2列,所以居中 -->
    <el-col :offset="2" :span="20"><img src="2024.png" style="width:100%;"></el-col>
  </el-row>
  <el-row :gutter="10">
    <el-col :span="3" v-for="item in 8" style="border:2px solid red;">{{item}}</el-col>
  </el-row>
  <el-row :gutter="10">
   <el-col :span="4"><img src="2024.png" style="width:100%;"></el-col>
   <el-col :span="8"><img src="2024.png" style="width:100%;"></el-col>
   <el-col :span="12"><img src="2024.png" style="width:100%;"></el-col>
  </el-row>
  <el-row :gutter="10">
   <el-col :offset="6" :span="12"><img src="2024.png" style="width:100%;"></el-col>
  </el-row>

  <!-- 布局嵌套 -->
  <el-row :gutter="10">
   <el-col :span="12" style="border:5px solid red;">12</el-col>
   <el-col :span="12"  style="border:5px solid blue;">
     <el-row :gutter="10">
      <el-col :span="6" v-for="item in 4" style="border:5px solid green;">4</el-col>
     </el-row>
   </el-col>
  </el-row>
</template>

<script setup>

</script>

<style scoped>

</style>